namespace Crux.Core.Websockets;
/// <summary>
/// WebSocketOptions
/// </summary>
public class WebSocketOptions
{
    /// <summary>
    /// buffer大小
    /// </summary>
    public int BufferSize { get; set; } = DefaultBufferSize;
    /// <summary>
    /// 服务器名称
    /// </summary>
    public string ServerName { get; init; } = GenerateServerName();
    /// <summary>
    /// 获取当前的服务器名称
    /// </summary>
    private static string GenerateServerName() => $"{Environment.MachineName}_{Guid.NewGuid():N}";

    /// <summary>
    ///
    /// </summary>
    internal static readonly int DefaultBufferSize = 4 * 1024;
}